Skip to content

CSHARP-4455: Fix test assertation. #994

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 17, 2022

Conversation

DmitryLukyanov
Copy link
Contributor

No description provided.

// in rare cases, the thrown error is "HttpRequest exception: AcceessDeniedException". That means you don't have authorization to perform the requested action.
// It more or less corresponds to the expected behavior here, but it's unclear why the same scenario triggers different exceptions.
// However, it looks harmless to slightly update the test assertation to avoid assertation failures on EG
AssertInnerEncryptionException<HttpRequestException>(ex, "Error in KMS response. HTTP status=400. Response body=\n{\"__type\":\"AccessDeniedException\"}");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% confident that thrown exception in this (and similar) patches is HttpRequestException. But if no, we will see it and will be able to fix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try to reproduce it before merging, but given that I saw this exception around 5 times in total during last few months, my attempts might be not enough to do it for sure, but at least we can try

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found and fixed. See for details.

Copy link
Contributor

@BorisDog BorisDog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minor comments.

DmitryLukyanov and others added 2 commits December 17, 2022 03:05
…on/prose-tests/ClientEncryptionProseTests.cs

Co-authored-by: BorisDog <[email protected]>
…on/prose-tests/ClientEncryptionProseTests.cs

Co-authored-by: BorisDog <[email protected]>
@DmitryLukyanov DmitryLukyanov merged commit 1535135 into mongodb:master Dec 17, 2022
BorisDog pushed a commit to BorisDog/mongo-csharp-driver that referenced this pull request Dec 22, 2022
dnickless pushed a commit to dnickless/mongo-csharp-driver that referenced this pull request Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants